﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace footwear
{
    public class CategoryBus
    {
        private readonly CategoryDao _categoryDao = new CategoryDao();

        public List<Category> GetListCategory()
        {
            return _categoryDao.GetListCategory();
        }

        public List<Category> GetListCategoryShowIndex()
        {
            return _categoryDao.GetListShowIndexCategory();
        }
        
        public string GetType(int id)
        {
            return _categoryDao.GetType(id);
        }

        public Category GetCategoryById(string id)
        {
            return _categoryDao.GetCategoryById(id);
        }

        public bool UpdateCategoryById(string id, string type, string showIndex)
        {
            return _categoryDao.UpdateCategoryById(id, type, showIndex);
        }

        public bool AddCategoryById(string type, string showIndex)
        {
            return _categoryDao.AddCategoryById(type, showIndex);
        }
    }
}